From: Giovanni Campagna Date: Sat, 2 Feb 2013 16:30:06 +0000 (+0100) Subject: UserMenu: don't show a lock icon when we're not actually locked X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4979 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b3549f421dd3affa26e502bae92c6650a159a4c3;p=gnome-shell.git UserMenu: don't show a lock icon when we're not actually locked The screen shield can now be active (forcing the lock-screen session mode) without being locked. https://bugzilla.gnome.org/show_bug.cgi?id=693007 --- diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 40710a523..1ead590ed 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -585,6 +585,7 @@ const UserMenuButton = new Lang.Class({ Lang.bind(this, this._updateHaveShutdown)); Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated)); + Main.screenShield.connect('locked-changed', Lang.bind(this, this._updatePresenceIcon)); this._sessionUpdated(); }, @@ -704,6 +705,11 @@ const UserMenuButton = new Lang.Class({ this._iconBox.child = this._idleIcon; else this._iconBox.child = this._offlineIcon; + + if (Main.sessionMode.isLocked) + this._iconBox.visible = Main.screenShield.locked; + else + this._iconBox.visible = true; }, _setupAccounts: function() {